<?php

namespace app\index\controller;

use app\index\model\Config as ConfigModel;
use think\Controller;
use think\Request;
use app\index\model\Banner as BannerModel;

class About extends BaseController
{
    public function __construct(Request $request = null)
    {
        parent::__construct($request);
        $banner = BannerModel::getBanner('about');
        $action = $request->action();
        $this->assign('banner', $banner);
        $this->assign('action', $action);
    }

    /**
     * 品牌历程
     */
    public function history()
    {
        $history = ConfigModel::getBaseValue('about_history');
        $this->assign('history', $history);
        return $this->fetch("about-brand-history");
    }

    /**
     * 品牌理念
     */
    public function idea()
    {
        $idea = ConfigModel::getBaseValue('about_idea');
        $this->assign('idea', $idea);
        return $this->fetch("about-brand-idea");
    }

    /**
     * 品牌介绍
     */
    public function intro()
    {
        $intro = ConfigModel::getBaseValue('about_intro');
        $this->assign('intro', $intro);
        return $this->fetch("about-brand-intro");
    }

    /**
     * 品牌故事
     */
    public function story()
    {
        $story = ConfigModel::getBaseValue('about_story');
        $this->assign('story', $story);
        return $this->fetch("about-brand-story");
    }

}
